#!/bin/bash
WHEREISJVM=$(whereis jvm)
echo ${WHEREISJVM} > tmp
JVM_HOME=$(awk '{print $2}' tmp)
ls -T1 ${JVM_HOME} > tmp
JVM_VERSION=$(head -1 tmp)
rm tmp
gcc -I${JVM_HOME}/${JVM_VERSION}/include -I${JVM_HOME}/${JVM_VERSION}/include/linux -fPIC -c weiconsole_ui_NativeUI.c
gcc -shared -Wl,-soname,libnativeui.so.1 -o libnativeui.so.1.0 weiconsole_ui_NativeUI.o 
cp libnativeui.so.1.0 ../../../lib/linux/libnativeui.so


